require(['./config'],()=>{
    require(['template','request','header','footer','cbl','jquery'],(template,req)=>{
        class List{
            constructor(){
                this.init();
            }
            init(){
                const id = window.location.search.split('=')[1];
                req.getListData(id)
                   .then(res => {
                       if(res.code === 0){
                           this.render(res.data.pageList)
                       }
                   }) 
            }
            render(list){
                $('.content .prod').html(template('ListTemplate',{list}))
            }
        }
        return new List();
    })
})